<template>
  <div class="text-center">
      <span  class="text-2xl">
    {{ value }}
  </span>
  </div>
</template>
<script setup lang="ts">
import {onMounted, ref} from 'vue';

const props = defineProps({
  valueFetch: {
    type: Function,
    default: () => {
      return '';
    },
  }
});
const value = ref('');
function init() {
  props.valueFetch().then(
    res => {
      value.value = res.value;
    }
  );
}
onMounted(() => {
  init();
});

onUpdated(() => {
  init();
});
</script>
